﻿<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>课程添加</title>
<link rel="stylesheet" href="/scriptZIP/layui.min.css">
	<link rel="stylesheet" href="css/common2.css">
	<link rel="stylesheet" href="../css/layui.css">
	<link rel="stylesheet" href="/scriptZIP/vue-select.min.css">
	<style>
		.layui-row {
			margin-top: 50px;
		}

		.time-state {
			width: 220px;
			margin-left: 110px;
		}

		.time-state input {
			display: none;
		}

		.time-state label {
			position: relative;
		}

		.time-state label::before {
			display: inline-block;
			content: "";
			width: 12px;
			height: 12px;
			border-radius: 50%;
			border: 1px solid #73c7ec;
			background-color: white;
			margin-right: 6px;
		}

		.time-state input:checked+label::before {
			background-color: #73c7ec;
		}

		.time-state input:checked+label::after {
			display: inline-block;
			content: "";
			width: 6px;
			height: 6px;
			border-radius: 50%;
			position: absolute;
			left: 6px;
			bottom: 6px;
		}

		.vs--searchable .vs__dropdown-toggle {
			display: inline-block;
			min-height: 36px;
			border-color: #D2D2D2;
			width: 70% !important;
			border: 1px solid #B2B2B2;
			background-color: white !important;
			color: black !important;
			padding-left: 10px;
			height: 38px;
			line-height: 1.3;
		}

		.vs__actions {
			display: none;
		}

		.vs__dropdown-menu {
			margin-left: 27px;
			width: 70%;
		}

		.vs__selected-options {
			height: 100%;
		}
	</style>
</head>

<body>

	<div class="layui-row" id="vue-root">
		<div></div>
		<div class="layui-col-md6 layui-col-md-offset3">
		

			<div class="layui-form-item">
				<label class="layui-form-label">课程名称</label>
				<div class="layui-input-block">
					<input name="deviceName" v-validate="'required'" autocomplete="off" placeholder="请输入课程名称"
						class="layui-input name" v-model="item.courseName">
					<div class="checkout_state" v-text="err('deviceName')"></div>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">课程规则</label>
				<div class="layui-input-block">
					<input name="deviceCode" v-validate="'required'" autocomplete="off" placeholder="请输入课程规则"
						class="layui-input tag" v-model="item.courseRule">
					<div class="checkout_state" v-text="err('deviceCode')"></div>
				</div>
			</div>

			

			<!-- <div class="layui-form-item">
				<label class="layui-form-label">收费方式</label>
				<div class="layui-input-block">
					<textarea name="remark" data-vv-as="备注" placeholder="请输入收费方式" class="layui-textarea text"
						v-model="item.remark"></textarea>
					<div class="checkout_state" v-text="err('remark')"></div>
				</div>
			</div> -->

			<div class="layui-form-item">
				<label class="layui-form-label">数量</label>
				<div class="layui-input-block">
					<textarea name="remark" data-vv-as="备注" placeholder="请输入数量" class="layui-input tag"
						v-model="item.quantity"></textarea>
					<div class="checkout_state" v-text="err('remark')"></div>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">单价</label>
				<div class="layui-input-block">
					<textarea name="remark" data-vv-as="备注" placeholder="请输入单价" class="layui-input tag"
						v-model="item.unitPrice                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              "></textarea>
					<div class="checkout_state" v-text="err('remark')"></div>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">总价</label>
				<div class="layui-input-block">
					<textarea name="remark" data-vv-as="备注" placeholder="请输入总价" class="layui-input tag"
						v-model="item.totalPrice"></textarea>
					<div class="checkout_state" v-text="err('remark')"></div>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">公司支付</label>
				<div class="layui-input-block">
					<textarea name="remark" data-vv-as="备注" placeholder="请输入公司支付金额" class="layui-input tag"
						v-model="item.companyPay"></textarea>
					<div class="checkout_state" v-text="err('remark')"></div>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">用户支付</label>
				<div class="layui-input-block">
					<textarea name="remark" data-vv-as="备注" placeholder="请输入用户支付金额" class="layui-input tag"
						v-model="item.userPay"></textarea>
					<div class="checkout_state" v-text="err('remark')"></div>
				</div>
			</div>
		

			<div class="layui-form-item">
				<div class="layui-input-block">
					<div class="offer" @click="submit">立即提交</div>
					<div class="return" onclick="history.back()">取消</div>
				</div>
			</div>
		</div>
	</div>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>


	<script src="/scriptZIP/axios.min.js"></script>
	<script src="/scriptZIP/vue-select.min.js"></script>

	<script src="js/common.js"></script>
	<script src="/js/item.js"></script>

	<script>
		Vue.component('v-select', VueSelect.VueSelect);
		var app = new Vue(merge({
			data: {
				item: {
					
				},
				agents: [],
				schools: [],
				agentId: null,
				url: '/api/courseXcx',
				fixedType: false
			},
			created: function () {
			
				this.init();
				if (typeof params().type1 !== 'undefined') {
					this.item.type1 = params().type1;
					this.fixedType = true;
				}
			},
			methods: {
				
			},
			computed: {
				
			},
			watch: {
				agentId: function (newValue, oldValue) {
					if (newValue)
						axios.get('/pc/school/all/' + newValue).then(function (res) {
							this.schools = res.data;
						}.bind(this));
				}
			}
		}));
	</script>


</body>

</html>